3.131 \(\int x^2 \sqrt{d+e x} (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=192 \[ \frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-\frac{32 b d^3 n \sqrt{d+e x}}{105 e^3}-\frac{32 b d^2 n (d+e x)^{3/2}}{315 e^3}+\frac{32 b d^{7/2} n \tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right )}{105 e^3}+\frac{36 b d n (d+e x)^{5/2}}{175 e^3}-\frac{4 b n (d+e x)^{7/2}}{49 e^3} \]

[Out]

(-32*b*d^3*n*Sqrt[d + e*x])/(105*e^3) - (32*b*d^2*n*(d + e*x)^(3/2))/(315*e^3) + (36*b*d*n*(d + e*x)^(5/2))/(1
75*e^3) - (4*b*n*(d + e*x)^(7/2))/(49*e^3) + (32*b*d^(7/2)*n*ArcTanh[Sqrt[d + e*x]/Sqrt[d]])/(105*e^3) + (2*d^
2*(d + e*x)^(3/2)*(a + b*Log[c*x^n]))/(3*e^3) - (4*d*(d + e*x)^(5/2)*(a + b*Log[c*x^n]))/(5*e^3) + (2*(d + e*x
)^(7/2)*(a + b*Log[c*x^n]))/(7*e^3)

________________________________________________________________________________________

Rubi [A]  time = 0.176065, antiderivative size = 192, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {43, 2350, 12, 897, 1261, 208} \[ \frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-\frac{32 b d^3 n \sqrt{d+e x}}{105 e^3}-\frac{32 b d^2 n (d+e x)^{3/2}}{315 e^3}+\frac{32 b d^{7/2} n \tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right )}{105 e^3}+\frac{36 b d n (d+e x)^{5/2}}{175 e^3}-\frac{4 b n (d+e x)^{7/2}}{49 e^3} \]

Antiderivative was successfully verified.

[In]

Int[x^2*Sqrt[d + e*x]*(a + b*Log[c*x^n]),x]

[Out]

(-32*b*d^3*n*Sqrt[d + e*x])/(105*e^3) - (32*b*d^2*n*(d + e*x)^(3/2))/(315*e^3) + (36*b*d*n*(d + e*x)^(5/2))/(1
75*e^3) - (4*b*n*(d + e*x)^(7/2))/(49*e^3) + (32*b*d^(7/2)*n*ArcTanh[Sqrt[d + e*x]/Sqrt[d]])/(105*e^3) + (2*d^
2*(d + e*x)^(3/2)*(a + b*Log[c*x^n]))/(3*e^3) - (4*d*(d + e*x)^(5/2)*(a + b*Log[c*x^n]))/(5*e^3) + (2*(d + e*x
)^(7/2)*(a + b*Log[c*x^n]))/(7*e^3)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2350

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = IntHide[(f*x)^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x,
 x], x], x] /; ((EqQ[r, 1] || EqQ[r, 2]) && IntegerQ[m] && IntegerQ[q - 1/2]) || InverseFunctionFreeQ[u, x]] /
; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[2*q] && ((IntegerQ[m] && IntegerQ[r]) || IGtQ[q, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 897

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{q = Denominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + (g*x^q)/e)^n*((c*d^2 - b*d
*e + a*e^2)/e^2 - ((2*c*d - b*e)*x^q)/e^2 + (c*x^(2*q))/e^2)^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, b, c
, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegersQ[n,
 p] && FractionQ[m]

Rule 1261

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] &&
 NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int x^2 \sqrt{d+e x} \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-(b n) \int \frac{2 (d+e x)^{3/2} \left (8 d^2-12 d e x+15 e^2 x^2\right )}{105 e^3 x} \, dx\\ &=\frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-\frac{(2 b n) \int \frac{(d+e x)^{3/2} \left (8 d^2-12 d e x+15 e^2 x^2\right )}{x} \, dx}{105 e^3}\\ &=\frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-\frac{(4 b n) \operatorname{Subst}\left (\int \frac{x^4 \left (35 d^2-42 d x^2+15 x^4\right )}{-\frac{d}{e}+\frac{x^2}{e}} \, dx,x,\sqrt{d+e x}\right )}{105 e^4}\\ &=\frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-\frac{(4 b n) \operatorname{Subst}\left (\int \left (8 d^3 e+8 d^2 e x^2-27 d e x^4+15 e x^6+\frac{8 d^4}{-\frac{d}{e}+\frac{x^2}{e}}\right ) \, dx,x,\sqrt{d+e x}\right )}{105 e^4}\\ &=-\frac{32 b d^3 n \sqrt{d+e x}}{105 e^3}-\frac{32 b d^2 n (d+e x)^{3/2}}{315 e^3}+\frac{36 b d n (d+e x)^{5/2}}{175 e^3}-\frac{4 b n (d+e x)^{7/2}}{49 e^3}+\frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}-\frac{\left (32 b d^4 n\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{d}{e}+\frac{x^2}{e}} \, dx,x,\sqrt{d+e x}\right )}{105 e^4}\\ &=-\frac{32 b d^3 n \sqrt{d+e x}}{105 e^3}-\frac{32 b d^2 n (d+e x)^{3/2}}{315 e^3}+\frac{36 b d n (d+e x)^{5/2}}{175 e^3}-\frac{4 b n (d+e x)^{7/2}}{49 e^3}+\frac{32 b d^{7/2} n \tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right )}{105 e^3}+\frac{2 d^2 (d+e x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac{4 d (d+e x)^{5/2} \left (a+b \log \left (c x^n\right )\right )}{5 e^3}+\frac{2 (d+e x)^{7/2} \left (a+b \log \left (c x^n\right )\right )}{7 e^3}\\ \end{align*}

Mathematica [A]  time = 0.195985, size = 151, normalized size = 0.79 \[ \frac{2 \sqrt{d+e x} \left (105 a \left (-4 d^2 e x+8 d^3+3 d e^2 x^2+15 e^3 x^3\right )+105 b \left (-4 d^2 e x+8 d^3+3 d e^2 x^2+15 e^3 x^3\right ) \log \left (c x^n\right )-2 b n \left (-179 d^2 e x+778 d^3+108 d e^2 x^2+225 e^3 x^3\right )\right )+3360 b d^{7/2} n \tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right )}{11025 e^3} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Sqrt[d + e*x]*(a + b*Log[c*x^n]),x]

[Out]

(3360*b*d^(7/2)*n*ArcTanh[Sqrt[d + e*x]/Sqrt[d]] + 2*Sqrt[d + e*x]*(105*a*(8*d^3 - 4*d^2*e*x + 3*d*e^2*x^2 + 1
5*e^3*x^3) - 2*b*n*(778*d^3 - 179*d^2*e*x + 108*d*e^2*x^2 + 225*e^3*x^3) + 105*b*(8*d^3 - 4*d^2*e*x + 3*d*e^2*
x^2 + 15*e^3*x^3)*Log[c*x^n]))/(11025*e^3)

________________________________________________________________________________________

Maple [F]  time = 0.593, size = 0, normalized size = 0. \begin{align*} \int{x}^{2} \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \sqrt{ex+d}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*ln(c*x^n))*(e*x+d)^(1/2),x)

[Out]

int(x^2*(a+b*ln(c*x^n))*(e*x+d)^(1/2),x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))*(e*x+d)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.47922, size = 990, normalized size = 5.16 \begin{align*} \left [\frac{2 \,{\left (840 \, b d^{\frac{7}{2}} n \log \left (\frac{e x + 2 \, \sqrt{e x + d} \sqrt{d} + 2 \, d}{x}\right ) -{\left (1556 \, b d^{3} n - 840 \, a d^{3} + 225 \,{\left (2 \, b e^{3} n - 7 \, a e^{3}\right )} x^{3} + 9 \,{\left (24 \, b d e^{2} n - 35 \, a d e^{2}\right )} x^{2} - 2 \,{\left (179 \, b d^{2} e n - 210 \, a d^{2} e\right )} x - 105 \,{\left (15 \, b e^{3} x^{3} + 3 \, b d e^{2} x^{2} - 4 \, b d^{2} e x + 8 \, b d^{3}\right )} \log \left (c\right ) - 105 \,{\left (15 \, b e^{3} n x^{3} + 3 \, b d e^{2} n x^{2} - 4 \, b d^{2} e n x + 8 \, b d^{3} n\right )} \log \left (x\right )\right )} \sqrt{e x + d}\right )}}{11025 \, e^{3}}, -\frac{2 \,{\left (1680 \, b \sqrt{-d} d^{3} n \arctan \left (\frac{\sqrt{e x + d} \sqrt{-d}}{d}\right ) +{\left (1556 \, b d^{3} n - 840 \, a d^{3} + 225 \,{\left (2 \, b e^{3} n - 7 \, a e^{3}\right )} x^{3} + 9 \,{\left (24 \, b d e^{2} n - 35 \, a d e^{2}\right )} x^{2} - 2 \,{\left (179 \, b d^{2} e n - 210 \, a d^{2} e\right )} x - 105 \,{\left (15 \, b e^{3} x^{3} + 3 \, b d e^{2} x^{2} - 4 \, b d^{2} e x + 8 \, b d^{3}\right )} \log \left (c\right ) - 105 \,{\left (15 \, b e^{3} n x^{3} + 3 \, b d e^{2} n x^{2} - 4 \, b d^{2} e n x + 8 \, b d^{3} n\right )} \log \left (x\right )\right )} \sqrt{e x + d}\right )}}{11025 \, e^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))*(e*x+d)^(1/2),x, algorithm="fricas")

[Out]

[2/11025*(840*b*d^(7/2)*n*log((e*x + 2*sqrt(e*x + d)*sqrt(d) + 2*d)/x) - (1556*b*d^3*n - 840*a*d^3 + 225*(2*b*
e^3*n - 7*a*e^3)*x^3 + 9*(24*b*d*e^2*n - 35*a*d*e^2)*x^2 - 2*(179*b*d^2*e*n - 210*a*d^2*e)*x - 105*(15*b*e^3*x
^3 + 3*b*d*e^2*x^2 - 4*b*d^2*e*x + 8*b*d^3)*log(c) - 105*(15*b*e^3*n*x^3 + 3*b*d*e^2*n*x^2 - 4*b*d^2*e*n*x + 8
*b*d^3*n)*log(x))*sqrt(e*x + d))/e^3, -2/11025*(1680*b*sqrt(-d)*d^3*n*arctan(sqrt(e*x + d)*sqrt(-d)/d) + (1556
*b*d^3*n - 840*a*d^3 + 225*(2*b*e^3*n - 7*a*e^3)*x^3 + 9*(24*b*d*e^2*n - 35*a*d*e^2)*x^2 - 2*(179*b*d^2*e*n -
210*a*d^2*e)*x - 105*(15*b*e^3*x^3 + 3*b*d*e^2*x^2 - 4*b*d^2*e*x + 8*b*d^3)*log(c) - 105*(15*b*e^3*n*x^3 + 3*b
*d*e^2*n*x^2 - 4*b*d^2*e*n*x + 8*b*d^3*n)*log(x))*sqrt(e*x + d))/e^3]

________________________________________________________________________________________

Sympy [A]  time = 12.9761, size = 364, normalized size = 1.9 \begin{align*} \frac{2 \left (\frac{a d^{2} \left (d + e x\right )^{\frac{3}{2}}}{3} - \frac{2 a d \left (d + e x\right )^{\frac{5}{2}}}{5} + \frac{a \left (d + e x\right )^{\frac{7}{2}}}{7} + b d^{2} \left (\frac{\left (d + e x\right )^{\frac{3}{2}} \log{\left (c \left (- \frac{d}{e} + \frac{d + e x}{e}\right )^{n} \right )}}{3} - \frac{2 n \left (\frac{d^{2} e \operatorname{atan}{\left (\frac{\sqrt{d + e x}}{\sqrt{- d}} \right )}}{\sqrt{- d}} + d e \sqrt{d + e x} + \frac{e \left (d + e x\right )^{\frac{3}{2}}}{3}\right )}{3 e}\right ) - 2 b d \left (\frac{\left (d + e x\right )^{\frac{5}{2}} \log{\left (c \left (- \frac{d}{e} + \frac{d + e x}{e}\right )^{n} \right )}}{5} - \frac{2 n \left (\frac{d^{3} e \operatorname{atan}{\left (\frac{\sqrt{d + e x}}{\sqrt{- d}} \right )}}{\sqrt{- d}} + d^{2} e \sqrt{d + e x} + \frac{d e \left (d + e x\right )^{\frac{3}{2}}}{3} + \frac{e \left (d + e x\right )^{\frac{5}{2}}}{5}\right )}{5 e}\right ) + b \left (\frac{\left (d + e x\right )^{\frac{7}{2}} \log{\left (c \left (- \frac{d}{e} + \frac{d + e x}{e}\right )^{n} \right )}}{7} - \frac{2 n \left (\frac{d^{4} e \operatorname{atan}{\left (\frac{\sqrt{d + e x}}{\sqrt{- d}} \right )}}{\sqrt{- d}} + d^{3} e \sqrt{d + e x} + \frac{d^{2} e \left (d + e x\right )^{\frac{3}{2}}}{3} + \frac{d e \left (d + e x\right )^{\frac{5}{2}}}{5} + \frac{e \left (d + e x\right )^{\frac{7}{2}}}{7}\right )}{7 e}\right )\right )}{e^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*x**n))*(e*x+d)**(1/2),x)

[Out]

2*(a*d**2*(d + e*x)**(3/2)/3 - 2*a*d*(d + e*x)**(5/2)/5 + a*(d + e*x)**(7/2)/7 + b*d**2*((d + e*x)**(3/2)*log(
c*(-d/e + (d + e*x)/e)**n)/3 - 2*n*(d**2*e*atan(sqrt(d + e*x)/sqrt(-d))/sqrt(-d) + d*e*sqrt(d + e*x) + e*(d +
e*x)**(3/2)/3)/(3*e)) - 2*b*d*((d + e*x)**(5/2)*log(c*(-d/e + (d + e*x)/e)**n)/5 - 2*n*(d**3*e*atan(sqrt(d + e
*x)/sqrt(-d))/sqrt(-d) + d**2*e*sqrt(d + e*x) + d*e*(d + e*x)**(3/2)/3 + e*(d + e*x)**(5/2)/5)/(5*e)) + b*((d
+ e*x)**(7/2)*log(c*(-d/e + (d + e*x)/e)**n)/7 - 2*n*(d**4*e*atan(sqrt(d + e*x)/sqrt(-d))/sqrt(-d) + d**3*e*sq
rt(d + e*x) + d**2*e*(d + e*x)**(3/2)/3 + d*e*(d + e*x)**(5/2)/5 + e*(d + e*x)**(7/2)/7)/(7*e)))/e**3

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{e x + d}{\left (b \log \left (c x^{n}\right ) + a\right )} x^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))*(e*x+d)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(e*x + d)*(b*log(c*x^n) + a)*x^2, x)